package com.itheima.stock.config;


import com.itheima.stock.propertis.IdWorkPropertis;
import com.itheima.stock.util.IdWorkers;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
public class IdWorksConfiguration {

   @Bean
    public IdWorkers idWorks(IdWorkPropertis propertis){
       return new IdWorkers(propertis.getMachineId(), propertis.getDatacenterId());
   }

}
